<template>
  <img :src="url" alt="加载失败" />
</template>
<script>
import { config } from "@/global";

export default {
  name: "PhotoViewer",
  computed: {
    baseURL() {
      return config.baseURL;
    },
    userFileId() {
      return this.$route.params.userFileId;
    },
    token() {
      return this.$store.getters.world.token;
    },
    url() {
      return (
        this.baseURL + "/file/preview/" + this.userFileId + "/" + this.token
      );
    }
  }
};
</script>
<style lang="less" scoped>
img {
  width: 100%;
  height: 100%;
}
</style>
